package com.example.zbh.dsliao.ui.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.example.zbh.dsliao.ui.FragmentFactory;

/**
 * Created by yaolin on 15/11/19.
 */
public class MusicListAdapter extends FragmentPagerAdapter {

    private String[] titles = {"推荐", "我的", ""};

    public MusicListAdapter(FragmentManager fm) {
        super(fm);
    }


    @Override
    public Fragment getItem(int position) {
        return FragmentFactory.createFragment(position);
    }

    @Override
    public int getCount() {
        return titles.length;
    }


    @Override
    public CharSequence getPageTitle(int position) {
        return titles[position];
    }
}
